package cate.common.table.throne.sacrifice;

import cate.common.table.ESheet;
import easy.java.dev.note.NoteClass;

import java.util.ArrayList;
import java.util.List;

@NoteClass("商品")
public class KingSacrificeItemSheet extends ESheet<KingSacrificeItemRow> {

    @Override
    public String getSheetName() {
        return "商品";
    }

    @Override
    protected KingSacrificeItemRow buildRow() {
        return new KingSacrificeItemRow();
    }

    public List<KingSacrificeItemRow> getItemsByJob(byte job) {
        List<KingSacrificeItemRow> itemRows = new ArrayList<>();
        for (KingSacrificeItemRow row : this.getList()) {
            if (row.job == job) {
                itemRows.add(row);
            }
        }
        return itemRows;
    }
}
